#ifndef QTOPENGLPLUS_H
#define QTOPENGLPLUS_H

#include <iostream>
#include <QGLWidget>
#include <QTimer>

/**
  @brief Gestions d'un Widget Opengl
  @author Bourgès Cyril
  @author Amiel Bastien
*/
class QtOpenGlPlus : public QGLWidget {
    Q_OBJECT

private:
  bool bInfoCarte ;
  bool bInfoGl ;
  QTimer animationTimer ;

public:
    QtOpenGlPlus(QWidget *parent = 0);
    virtual ~QtOpenGlPlus();

private:

  //------Opengl------
  void initializeGL () ;
  void paintGL () ;
  void resizeGL ( int width, int height ) ;
private slots:
  void  on_idle();



protected:
  //------Input------
  void mousePressEvent ( QMouseEvent * event ) ;
  void mouseMoveEvent ( QMouseEvent * event ) ;
  void mouseReleaseEvent ( QMouseEvent * event ) ;
  void wheelEvent ( QWheelEvent * event ) ;
  void closeEvent ( QCloseEvent * event ) ;
  void keyPressEvent ( QKeyEvent * event ) ;
  void keyReleaseEvent ( QKeyEvent * event ) ;


public:
    //------Opengl------
    virtual void initGL() ;
    virtual bool callback_idle();
    virtual void callback_reshape(int width, int height) ;
    virtual void callback_display() ;

  //------Input------
//     virtual bool on_button_press_event(MouseEvent* event, InputWidget* scene) ;
//     virtual bool on_motion_notify_event(MouseEvent* event, InputWidget* scene) ;
//     virtual bool on_button_release_event(MouseEvent* event, InputWidget* scene) ;
//     virtual bool on_scroll_event(EventScroll* event, InputWidget* scene) ;
//     virtual bool on_key_press_event (KeyEvent* event, InputWidget* scene) ;
//     virtual bool on_key_special (Gtk::DirectionType event, Gtk::Widget* scene ) ;
//     virtual bool on_key_release_event (KeyEvent* event, InputWidget* scene) ;
//     virtual bool on_close_event (CloseEvent* event, InputWidget* scene) ;




};
#else
class QtOpenGlPlus;
#endif //QTOPENGL_H

